import request from '@/utils/request'

// 修改提现账号
export function updateWithdrawAccount(data) {
    return request({
        url: '/admin/profile/account',
        method: 'post',
        data
    })
}





export function getWithdrawList(params) {
    return request({
        url: '/admin/withdraw/all',
        method: 'get',
        params
    })
}



export function statusWithdraw(data) {
    return request({
        url: `/admin/withdraw/approve`,
        method: 'post',
        data
    })
}


// 获取分佣日志列表
export function fetchCommissionList(query) {
    return request({
        url: '/admin/commission/list',
        method: 'get',
        params: query
    })
}

// 添加分佣记录
export function addCommission(data) {
    return request({
        url: '/admin/commission/add',
        method: 'post',
        data
    })
}

// 更新分佣记录
export function updateCommission(id, data) {
    return request({
        url: `/admin/commission/update/${id}`,
        method: 'put',
        data
    })
}

// 删除分佣记录
export function deleteCommission(id) {
    return request({
        url: `/admin/commission/delete/${id}`,
        method: 'delete'
    })
}
